package com.itheima.health.controller;

import com.itheima.health.common.R;
import com.itheima.health.entity.CheckItem;
import com.itheima.health.service.CheckItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/checkItem")
public class CheckItemController {

    @Autowired
    CheckItemService checkItemService;

   @GetMapping
    public R<List<CheckItem>> selectAll(){
       List<CheckItem> list = checkItemService.list();
       return R.success(list);
   }
}
